﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Persistencia
{
    public static class ConfigLoader
    {
        private static System.Configuration.AppSettingsReader appSReader;
        static ConfigLoader()
        {
            appSReader = new System.Configuration.AppSettingsReader();
        }
        public static int getInteger(string key)
        {
            return (int) appSReader.GetValue(key, typeof(int));
        }

        public static bool getBoolean(string key)
        {
            return (bool)appSReader.GetValue(key, typeof(bool));
        }

        public static double getDouble(string key)
        {
            return (double)appSReader.GetValue(key, typeof(double));
        }

        public static String getString(string key)
        {
            return appSReader.GetValue(key, typeof(string)).ToString();
        }
    }
}
